//有序合成
onEvent('recipes', (event) => {
    const id = 'nr2:base/start/shaped_s/';
    const recipes = [
        {
            output: 'mekanism:basic_fluid_tank',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'emendatusenigmatica:iron_plate',
                B: 'minecraft:redstone',
                C: 'pneumaticcraft:small_tank',

            },
            id: `${id}basic_fluid_tank`
        },
        {
            output: '2x mekanism:energy_tablet',
            pattern: ['ABA', 'DCD', 'ABA'],
            key: {
                A: 'emendatusenigmatica:electrum_gear',
                D: 'draconicevolution:wyvern_energy_core',
                C: 'thermal:energy_cell',
                B: 'mekanism:alloy_infused'

            },
            id: `${id}energy_tablet`
        },
        {
            output: 'mekanism:electrolytic_core',
            pattern: ['ABA', 'DCD', 'ABA'],
            key: {
                A: 'mekanism:alloy_infused',
                D: 'immersiveengineering:graphite_electrode',
                C: 'thermal:rf_potato',
                B: 'immersiveengineering:coil_hv'

            },
            id: `${id}electrolytic_core`
        },
        {
            output: 'mekanism:metallurgic_infuser',
            pattern: ['ABF', 'BEB', 'CDC'],
            key: {
                A: 'pneumaticcraft:assembly_drill',
                B: 'mekanism:basic_control_circuit',
                C: 'mekanism:steel_casing',
                D: 'pneumaticcraft:assembly_platform',
                E: 'thermal:machine_bottler',
                F: 'pneumaticcraft:assembly_laser'

            },
            id: `${id}metallurgic_infuser`
        },
        {
            output: '4x mekanism:basic_mechanical_pipe',
            pattern: ['AAA', 'BCB', 'AAA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'thermal:obsidian_glass',
                C: 'pipez:fluid_pipe'
            },
            id: `${id}basic_mechanical_pipe`
        },
        {
            output: '4x mekanism:basic_universal_cable',
            pattern: ['AAA', 'BCB', 'AAA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'thermal:obsidian_glass',
                C: 'pipez:energy_pipe'
            },
            id: `${id}basic_universal_cable`
        },
        {
            output: '4x mekanism:basic_logistical_transporter',
            pattern: ['AAA', 'BCB', 'AAA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'thermal:obsidian_glass',
                C: 'pipez:item_pipe'
            },
            id: `${id}basic_logistical_transporter`
        },
        {
            output: 'mekanism:crusher',
            pattern: ['ABF', 'BEB', 'CDC'],
            key: {
                A: 'pneumaticcraft:assembly_drill',
                B: 'mekanism:basic_control_circuit',
                C: 'mekanism:steel_casing',
                D: 'pneumaticcraft:assembly_platform',
                E: 'thermal:machine_pulverizer',
                F: 'pneumaticcraft:assembly_laser'

            },
            id: `${id}crusher`
        },
        {
            output: 'mekanism:energized_smelter',
            pattern: ['ABA', 'BEB', 'CDC'],
            key: {
                A: '#forge:storage_blocks/osmium',
                B: 'mekanism:basic_control_circuit',
                C: 'mekanism:steel_casing',
                D: 'pneumaticcraft:assembly_platform',
                E: 'thermal:machine_furnace',

            },
            id: `${id}energized_smelter`
        },
        {
            output: 'mekanism:osmium_compressor',
            pattern: ['ABA', 'BEB', 'CDC'],
            key: {
                A: '#forge:storage_blocks/osmium',
                B: 'mekanism:basic_control_circuit',
                C: 'mekanism:steel_casing',
                D: 'pneumaticcraft:assembly_platform',
                E: 'thermal:machine_press',

            },
            id: `${id}osmium_compressor`
        },
        {
            output: 'ironchest:obsidian_chest',
            pattern: ['AAA', 'ABA', 'AAA'],
            key: {
                A: 'mekanism:ingot_refined_obsidian',
                B: 'mekanism:personal_chest',

            },
            id: `${id}obsidian_chest`
        },
        {
            output: 'cookingforblockheads:sink',
            pattern: ['ABA', 'ACA', 'AAA'],
            key: {
                A: 'mekanism:hdpe_sheet',
                B: 'thermal:device_water_gen',
                C: 'mekanism:electric_pump'

            },
            id: `${id}dynamic_sink`
        },
        {
            output: '2x mekanism:dynamic_tank',
            pattern: ['AAA', 'ABA', 'AAA'],
            key: {
                A: 'emendatusenigmatica:tin_plate',
                B: 'pneumaticcraft:large_tank',

            },
            id: `${id}dynamic_tank`
        },
        {
            output: 'mekanism:enrichment_chamber',
            pattern: [' A ', 'BCB', 'DED'],
            key: {
                A: 'create:mechanical_mixer',
                B: 'thermal:obsidian_glass',
                C: 'mekanism:steel_casing',
                D: 'mekanism:energy_tablet',
                E: 'emendatusenigmatica:osmium_block'

            },
            id: `${id}dynamic_tank`
        },
        {
            output: 'mekanism:chemical_dissolution_chamber',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'mekanism:block_refined_obsidian',
                C: 'mekanism:elite_control_circuit',
                D: 'mekanism:steel_casing',
                B: 'mekanism:elite_chemical_tank'
            },
            id: `${id}chemical_dissolution_chamber`
        },
        {
            output: 'mekanism:chemical_washer',
            pattern: ['AEA', 'CDC', 'ABA'],
            key: {
                A: 'mekanism:block_refined_obsidian',
                C: 'mekanism:elite_control_circuit',
                D: 'mekanism:steel_casing',
                B: 'mekanism:elite_chemical_tank',
                E: 'mekanism:elite_fluid_tank'
            },
            id: `${id}chemical_washer`
        },
        {
            output: 'mekanism:chemical_crystallizer',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'mekanism:block_refined_obsidian',
                C: 'mekanism:elite_control_circuit',
                D: 'mekanism:steel_casing',
                B: 'mekanism:block_refined_glowstone'
            },
            id: `${id}chemical_crystallizer`
        },
        {
            output: 'mekanism:basic_chemical_tank',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'pneumaticcraft:pressure_chamber_wall',
                C: 'pneumaticcraft:pressure_chamber_valve',
                D: 'pneumaticcraft:advanced_pressure_tube',
                B: 'pneumaticcraft:pressure_chamber_glass'
            },
            id: `${id}basic_chemical_tank`

        },
        {
            output: 'mekanism:isotopic_centrifuge',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'mekanism:steel_casing',
                B: 'mekanism:elite_control_circuit',
                C: 'mekanismgenerators:reactor_glass',
                D: 'thermal:machine_centrifuge'
            },
            id: `${id}isotopic_centrifuge`

        },
        {
            output: '4x mekanismgenerators:fission_reactor_casing',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'emendatusenigmatica:lead_plate',
                B: 'mekanism:alloy_reinforced',
                C: 'mekanism:hdpe_sheet',
                D: 'mekanism:steel_casing'
            },
            id: `${id}fission_reactor_casing`

        },
        {
            output: '2x mekanismgenerators:reactor_glass',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'mekanism:dust_lithium',
                B: 'emendatusenigmatica:aluminum_plate',
                C: 'mekanism:structural_glass',
            },
            id: `${id}reactor_glass`

        },
        {
            output: '4x mekanism:boiler_casing',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'emendatusenigmatica:nickel_plate',
                C: 'immersiveengineering:furnace_heater',
            },
            id: `${id}boiler_casing`

        },
        {
            output: '4x mekanismgenerators:turbine_casing',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'emendatusenigmatica:nickel_plate',
                C: 'immersiveengineering:radiator',
            },
            id: `${id}turbine_casing`

        },
        {
            output: 'mekanismgenerators:saturating_condenser',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'emendatusenigmatica:tin_plate',
                C: 'minecraft:bucket',
            },
            id: `${id}saturating_condenser`

        },
        {
            output: '8x mekanism:module_base',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'refinedstorage:advanced_processor',
                B: 'mekanism:hdpe_sheet',
                C: 'projectred-core:draw_plate',
            },
            id: `${id}mek_module_base`
        },
        {
            output: 'mekanismgenerators:fission_fuel_assembly',
            pattern: ['BAB', 'BCB', 'BAB'],
            key: {
                A: 'emendatusenigmatica:lead_plate',
                B: 'mekanismgenerators:fission_reactor_casing',
                C: 'mekanism:elite_chemical_tank',
            },
            id: `${id}fission_fuel_assembly`
        },
        {
            output: 'storagedrawers:upgrade_template',
            pattern: ['AAA', 'ABA', 'AAA'],
            key: {
                A: 'immersiveengineering:stick_treated',
                B: 'pneumaticcraft:logistics_core',
            },
            id: `${id}upgrade_template`
        },
        {
            output: 'mekanism:pressure_disperser',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'minecraft:iron_bars',
                C: 'mekanism:steel_casing',
            },
            id: `${id}pressure_disperser`
        },
        {
            output: 'mekanism:quantum_entangloporter',
            pattern: ['ADA', 'BCB', 'ADA'],
            key: {
                A: 'kubejs:party_3_ingot',
                B: 'enderstorage:ender_tank',
                C: 'entangled:block',
                D: 'enderstorage:ender_chest'
            },
            id: `${id}quantum_entangloporter`
        },
        {
            output: '4x kubejs:stagemachinery_3',
            pattern: ['AAA', 'ABA', 'AAA'],
            key: {
                A: 'kubejs:plastic_steel_ingot',
                B: 'kubejs:stagemachinery_2',
            },
            id: `${id}stagemachinery_3`
        },
        {
            output: 'minecraft:wooden_sword',
            pattern: [' A ', ' A ', ' B '],
            key: {
                A: 'minecraft:oak_planks',
                B: 'minecraft:stick',
            },
            id: `${id}wooden_sword`
        },
        {
            output: 'minecraft:wooden_shovel',
            pattern: [' A ', ' B ', ' B '],
            key: {
                A: 'minecraft:oak_planks',
                B: 'minecraft:stick',
            },
            id: `${id}wooden_shovel`
        },
        {
            output: 'minecraft:wooden_pickaxe',
            pattern: ['AAA', ' B ', ' B '],
            key: {
                A: 'minecraft:oak_planks',
                B: 'minecraft:stick',
            },
            id: `${id}wooden_pickaxe`
        },
        {
            output: 'minecraft:wooden_axe',
            pattern: ['AA ', 'AB ', ' B '],
            key: {
                A: 'minecraft:oak_planks',
                B: 'minecraft:stick',
            },
            id: `${id}wooden_axe`
        },
        {
            output: 'minecraft:wooden_hoe',
            pattern: ['AA ', ' B ', ' B '],
            key: {
                A: 'minecraft:oak_planks',
                B: 'minecraft:stick',
            },
            id: `${id}wooden_hoe`
        },
        {
            output: 'draconicevolution:basic_crafting_injector',
            pattern: ['AAA', 'BCB', 'BDB'],
            key: {
                A: 'mekanism:alloy_infused',
                B: 'mekanism:hdpe_sheet',
                C: 'mekanism:steel_casing',
                D: 'mekanism:basic_control_circuit'
            },
            id: `${id}basic_crafting_injector`
        },
        {
            output: 'draconicevolution:crafting_core',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'immersiveengineering:coil_hv',
                B: 'mekanism:hdpe_sheet',
                C: 'mekanism:steel_casing',
            },
            id: `${id}crafting_core`
        },
        {
            output: 'draconicevolution:draconium_core',
            pattern: ['ABA', 'BCB', 'ABA'],
            key: {
                A: 'draconicevolution:draconium_ingot',
                B: 'emendatusenigmatica:electrum_plate',
                C: 'mekanism:basic_control_circuit',
            },
            id: `${id}draconium_core`
        },
        {
            output: 'draconicevolution:potentiometer',
            pattern: [' A ', 'BBB', '   '],
            key: {
                A: 'create:polished_rose_quartz',
                B: 'minecraft:smooth_quartz_slab',
            },
            id: `${id}potentiometer`
        },
        {
            output: 'draconicevolution:reactor_injector',
            pattern: ['DDD', 'CBC', 'AAA'],
            key: {
                A: 'mekanismgenerators:fusion_reactor_frame',
                B: 'mekanism:supercharged_coil',
                C: 'draconicevolution:awakened_core',
                D: 'mekanism:ultimate_control_circuit'
            },
            id: `${id}reactor_injectorr`
        },
        {
            output: 'compactvoidminers:void_miner',
            pattern: ['AAA', 'ABA', 'AAA'],
            key: {
                A: 'kubejs:create_ingot',
                B: 'mekanism:digital_miner',
            },
            id: `${id}comvoid_miner`
        },
        {
            output: 'minecraft:clock',
            pattern: [' B ', 'BAB', ' B '],
            key: {
                A: 'minecraft:redstone',
                B: 'emendatusenigmatica:bronze_plate',
            },
            id: `${id}mc_clock`
        },
        {
            output: 'darkutils:charm_gluttony',
            pattern: [' A ', 'A A', ' AB'],
            key: {
                A: 'immersiveengineering:wire_copper',
                B: 'kubejs:party_1_ingot',
            },
            id: `${id}charm_gluttony`
        },
        {
            output: 'create:mechanical_press',
            pattern: ['AAA', 'BCB', ' D '],
            key: {
                A: 'pneumaticcraft:plastic',
                B: 'create:gearbox',
                C: 'rftoolsbase:machine_frame',
                D: 'minecraft:anvil'
            },
            id: `${id}createmechanical_press`
        },
        {
            output: 'create:turntable',
            pattern: ['AAA', ' B ', '   '],
            key: {
                A: '#forge:treated_wood_slab',
                B: 'create:andesite_casing'
            },
            id: `${id}createturntable`
        },
        {
            output: 'torchmaster:megatorch',
            pattern: ['AAA', 'AAA', 'AAA'],
            key: {
                A: 'minecraft:torch',
            },
            id: `${id}torchmegatorch`
        },
        {
            output: 'thermal:upgrade_augment_1',
            pattern: ['ABA', 'DCD', 'AEA'],
            key: {
                A: 'emendatusenigmatica:invar_gear',
                B: 'thermal:fluid_cell_frame',
                C: 'kubejs:party_2_ingot',
                D: 'thermal:rf_coil',
                E: 'thermal:energy_cell_frame'

            },
            id: `${id}upgrade_augment_1`
        },
        {
            output: '4x create:precision_mechanism',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'emendatusenigmatica:steel_plate',
                B: 'emendatusenigmatica:emerald_plate',
                C: 'emendatusenigmatica:bronze_plate',
                D: 'pneumaticcraft:printed_circuit_board',
            },
            id: `${id}precision_mechanism_2`
        },
        {
            output: 'pneumaticcraft:turbine_rotor',
            pattern: [' B ', ' A ', 'B B'],
            key: {
                A: 'immersiveengineering:windmill',
                B: 'pneumaticcraft:turbine_blade',
            },
            id: `${id}turbine_rotor`
        },
        {
            output: 'mekanismgenerators:wind_generator',
            pattern: [' AB', ' C ', ' D '],
            key: {
                A: 'immersiveengineering:dynamo',
                B: 'pneumaticcraft:turbine_rotor',
                C: 'immersiveposts:postbase',
                D: 'thermal:machine_frame'
            },
            id: `${id}wind_generator`
        },
        {
            output: 'mekanism:upgrade_speed',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'immersiveengineering:wire_steel',
                B: 'mekanism:alloy_infused',
                C: 'mekanism:block_refined_glowstone',
                D: 'mekanism:basic_control_circuit'

            },
            id: `${id}upgrade_speed`
        },
        {
            output: 'mekanism:upgrade_energy',
            pattern: ['ABA', 'CDC', 'ABA'],
            key: {
                A: 'immersiveengineering:wire_steel',
                B: 'mekanism:alloy_infused',
                C: 'mekanism:block_refined_obsidian',
                D: 'mekanism:basic_control_circuit'

            },
            id: `${id}upgrade_energy`
        },
        {
            output: 'kubejs:reform_counter',
            pattern: ['AAA', 'ABC', 'AAA'],
            key: {
                A: 'kubejs:polluted_dust',
                B: '#forge:glass_panes',
                C: 'minecraft:lever',

            },
            id: `${id}reform_counter`
        },
       


    ];
    recipes.forEach((recipe) => {
        event.shaped(recipe.output, recipe.pattern, recipe.key).id(recipe.id);
    });

    event.replaceInput({ mod: 'xnet' }, 'minecraft:gold_nugget', 'tconstruct:tinkers_bronze_ingot');
    event.replaceInput({ mod: 'xnet' }, '#forge:ingots/gold', 'tconstruct:tinkers_bronze_ingot');
    event.replaceInput({ mod: 'xnet' }, 'rftoolsbase:machine_frame', 'rftoolsbase:machine_frame');


    //'mekanism:solar_neutron_activator'
    event.replaceInput({ id: 'mekanism:solar_neutron_activator' }, 'mekanism:elite_control_circuit', 'mekanism:ultimate_control_circuit');

    //mekanism:chemical_dissolution_chamber
    //'#forge:ingots/steel'


    //'storagedrawers:iron_storage_upgrade'
    let storagedrawers = ['iron', 'gold', 'diamond', 'emerald'];
    storagedrawers.forEach((i) => {
        if (i == 'iron' || i == 'gold')
            event.replaceInput({ id: `storagedrawers:${i}_storage_upgrade` }, `#forge:ingots/${i}`, `emendatusenigmatica:${i}_gear`);
        else
            event.replaceInput({ id: `storagedrawers:${i}_storage_upgrade` }, `#forge:gems/${i}`, `emendatusenigmatica:${i}_gear`);

    })


    //mekanism:processing/lategame/antimatter_pellet/from_gas

});